/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * supervision_rh_plazas.java
 *
 * Created on 2/05/2014, 12:11:23 PM
 */

package sie_invdis;


import java.sql.*;
import javax.swing.*;
import java.awt.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Calendar;

import java.text.ParseException;
import java.text.*;
/**
 *
 * @author michelle
 */
public class supervision_rh_plazas extends javax.swing.JFrame {

    private javax.swing.table.DefaultTableModel jtable_modelo_empleado_p;
    private javax.swing.table.DefaultTableModel jtable_modelo_horarios;

    bd_conexion x = new bd_conexion();
    ResultSet rs = null;

    private java.util.Date fechahoy=new Date();
    int fempleadoactual=0, fpreguntaactual=0,fpuestoactual=0,findicadoractual,opcioncatalogo=0,controlcomboasi=0,indexactual=0;
    private SimpleDateFormat formateador = new SimpleDateFormat("dd-MM-yyyy");
    private SimpleDateFormat formateadoresta = new SimpleDateFormat("yyyy-MM-dd");
    String textobuscaemplea="";
    /** Creates new form supervision_rh_plazas */
    public supervision_rh_plazas() {
       this.iniciar_modelo_empleadoplaza();
       this.iniciar_modelo_horarios();
        initComponents();

        jt_catempleados1.getColumnModel().getColumn(0).setPreferredWidth(20);//tem ent
        jt_catempleados1.getColumnModel().getColumn(1).setPreferredWidth(100);//familia
        jt_catempleados1.getColumnModel().getColumn(2).setPreferredWidth(120);//subfam.
        jt_catempleados1.getColumnModel().getColumn(3).setPreferredWidth(80);//subfam.
        jt_catempleados1.getColumnModel().getColumn(4).setPreferredWidth(160);//tem ent
        jt_catempleados1.getColumnModel().getColumn(5).setPreferredWidth(60);//familia
        jt_catempleados1.getColumnModel().getColumn(6).setPreferredWidth(50);//subfam.
        jt_catempleados1.getColumnModel().getColumn(7).setPreferredWidth(60);//tem ent
        jt_catempleados1.getColumnModel().getColumn(8).setPreferredWidth(60);//tem ent
         this.carga_datos_empleadoplazas(0, "");
         this.loadcombo_horarios();
         this.loadcomboasist_status();
    }
private void iniciar_modelo_empleadoplaza()
    {
        jtable_modelo_empleado_p=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_empleado_p.addColumn("<html><b>Status</b></html>");
        jtable_modelo_empleado_p.addColumn("<html><b>Categoria</b></html>");
        jtable_modelo_empleado_p.addColumn("<html><b>Puesto</b></html>");
        jtable_modelo_empleado_p.addColumn("<html><b>Area</b></html>");
        jtable_modelo_empleado_p.addColumn("<html><b>empleado</b></html>");
        jtable_modelo_empleado_p.addColumn("<html><b>rfc</b></html>");
        jtable_modelo_empleado_p.addColumn("<html><b>Imss</b></html>");
        jtable_modelo_empleado_p.addColumn("<html><b>F.Ingreso</b></html>");
        jtable_modelo_empleado_p.addColumn("<html><b>Descripcion</b></html>");
    }
private void iniciar_modelo_horarios()
    {
        jtable_modelo_horarios=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_horarios.addColumn("<html><b>dia</b></html>");
        jtable_modelo_horarios.addColumn("<html><b>Hora E.</b></html>");
        jtable_modelo_horarios.addColumn("<html><b>Hora S.</b></html>");
        jtable_modelo_horarios.addColumn("<html><b>Comida</b></html>");
        jtable_modelo_horarios.addColumn("<html><b>Hora E.</b></html>");
        jtable_modelo_horarios.addColumn("<html><b>Hora S.</b></html>");
        jtable_modelo_horarios.addColumn("<html><b>H.Trabajadas</b></html>");
        jtable_modelo_horarios.addColumn("<html><b>Obs</b></html>");
        jtable_modelo_horarios.addColumn("<html><b>Asis</b></html>");
    }


private void carga_datos_empleadoplazas(int opcion,String textobusca)
   {
       //invoco al metodo que trae el recordset de datos
       //voy por el detalle del documento
       String texto="select * from x1_supervision_empleados_catalogo_plazas("+opcion+",'"+textobusca+"','','','') as (idplaza smallint,idarea smallint,idpuesto smallint,idempleado integer,idcontable character varying(20),idstatusplaza smallint,observaplaza text,nivel character varying(20),area text,idnivsup smallint,jerarquia smallint,nivsup character varying(20),descripcion text,nivelsupprincipal character varying(20),puestodescrip text,obspuesto text,idcontabil character varying(12),idcategoria character varying(12),categoria text,categoriaobs text,emp_nombre character varying(50),emp_app character varying(50),emp_apm character varying(50),fechanac date,fechaalta date,rfc character varying(18),curp character varying(20),imss character varying(20));";
       while(jtable_modelo_empleado_p.getRowCount()>0)jtable_modelo_empleado_p.removeRow(0);
       Object[] fnewRow = new Object[9];
       System.out.println(texto);
       try
       {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                        if(rs.getString("idstatusplaza").equals("1"))
                            {
                                fnewRow[0]="VACANTE";
                            }
                        else
                            {
                                fnewRow[0]="ACTIVO";
                            }
                        fnewRow[1]=rs.getString("idcategoria")+":"+rs.getString("categoria");
                        fnewRow[2]=rs.getString("idplaza")+":"+rs.getString("puestodescrip");
                        fnewRow[3]=rs.getString("area");
                        fnewRow[4]=rs.getString("idempleado")+":"+rs.getString("emp_nombre")+" "+rs.getString("emp_app")+" "+rs.getString("emp_apm");
                        fnewRow[5]=rs.getString("rfc");
                        fnewRow[6]=rs.getString("Imss");
                        fnewRow[7]=rs.getString("fechaalta");
                        fnewRow[8]=rs.getString("observaplaza")+" ";
                        jtable_modelo_empleado_p.addRow(fnewRow);
                }
       }
        catch(Exception e)
            {
            System.out.println(e.getMessage());
            }
      this.jlbl_cantidadregistros.setText(String.valueOf(this.jtable_modelo_empleado_p.getRowCount()));
   }

private void carga_datos_plazashorarios(int opcion,String textobusca)
   {
       //invoco al metodo que trae el recordset de datos
       //voy por el detalle del documento
       String texto="select * from x1_supervision_empleados_catalogo_plazas_hora("+opcion+",'"+textobusca+"','','','') as (id integer,idplaza smallint,dia smallint,horae time,horas time,horaec time,horasc time,minutos smallint,obs text,horat numeric,idasis smallint);";
       while(jtable_modelo_horarios.getRowCount()>0)jtable_modelo_horarios.removeRow(0);
       Object[] fnewRow = new Object[9];
       System.out.println(texto);
       try
       {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                        fnewRow[0]=rs.getString("dia");
                        fnewRow[1]=rs.getString("horae").substring(0,5);
                        fnewRow[2]=rs.getString("horas").substring(0,5);
                        fnewRow[3]=rs.getString("minutos");
                        fnewRow[4]=rs.getString("horaec").substring(0,5);
                        fnewRow[5]=rs.getString("horasc").substring(0,5);
                        fnewRow[6]=rs.getString("horat");
                        fnewRow[7]=rs.getString("obs");
                        fnewRow[8]=rs.getString("idasis");
                        jtable_modelo_horarios.addRow(fnewRow);
                }
       }
        catch(Exception e)
            {
            System.out.println(e.getMessage());
            }
      this.jlbl_cantidadregistros.setText(String.valueOf(this.jtable_modelo_empleado_p.getRowCount()));
   }

private void diodblclickpe(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:

        if (variables_global.getnivelusu() < 3)
            {
                System.out.println("dio doble  click");
                int fila = jt_catempleados1.getSelectedRow();
                this.jtf_plazaidemp.setText(this.jtable_modelo_empleado_p.getValueAt(fila, 3).toString());
                String idcad[]=this.jtable_modelo_empleado_p.getValueAt(fila, 2).toString().split(":");
                this.jtf_plazaidemp1.setText(idcad[1]);
                this.jtf_plazaidplaza.setText(idcad[0]);
                this.jtf_plazadescrip.setText(this.jtable_modelo_empleado_p.getValueAt(fila, 8).toString());
                this.carga_datos_plazashorarios(0, idcad[0]);
            }
    }
private void loadcombo_horarios()
 {
            this.jcmbx_ope_diavisita.removeAllItems();
            this.jcmbx_ope_diavisita.addItem("8"+":"+"No Asignado");
            this.jcmbx_ope_diavisita.addItem("1"+":"+"DOMINGO");
            this.jcmbx_ope_diavisita.addItem("2"+":"+"LUNES");
            this.jcmbx_ope_diavisita.addItem("3"+":"+"MARTES");
            this.jcmbx_ope_diavisita.addItem("4"+":"+"MIERCOLES");
            this.jcmbx_ope_diavisita.addItem("5"+":"+"JUEVES");
            this.jcmbx_ope_diavisita.addItem("6"+":"+"VIERNES");
            this.jcmbx_ope_diavisita.addItem("7"+":"+"SABADO");

    }

private void loadcomboasist_status(){
            try
            {
              rs = x.sieuno_executediversosv2("select * from x1_supervision_empleados_asistencia_statusv2(1,'','','','') as (id smallint,descrip text,observacion text);",variables_global.getconexiongral());
               while (rs.next())
                    {
                      this.jcmbx_asist_status.addItem(rs.getString("id")+":"+rs.getString("descrip")+"("+rs.getString("observacion")+")");
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }
private void asistencia_actualiza(int opcion,String idplaza,String iddiase,String observacion,String departamento,String shorae,String shoras,String idstatus,String valorx,String fechasal, String horastraba, String horaentprog, String horasalprog, String horaentdcom, String horasaldcom, String minutoscom, String htra, String extra2)
    {
       //invoco al metodo que trae el recordset de datos
    int encontrado=0,columnatitulo=0;
    String texto="select * from x1_supervision_empleados_plazas_horarios("+opcion+","+idplaza+","+iddiase+",'"+observacion+"','1','"+htra+"','"+horaentprog+"','"+horasalprog+"','"+horaentdcom+"','"+horasaldcom+"','"+minutoscom+"','','');";
    System.out.println(texto);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                       encontrado=rs.getInt(1);
                }
         }
        catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
       if (encontrado==1)
              {

                    JOptionPane.showMessageDialog(null,"Gracias Registro Correcto!", "Sistema Integral(Modificando Asistencia) : Ayuda",1);
                    //this.carga_datos_asistencia(2, this.jtf_empid.getText(),this.fechaamericana(this.jdc_fechainicial.getDate()),this.fechaamericana(this.jdc_fechafinal.getDate()));
              }
       else
              {
               JOptionPane.showMessageDialog(null,"Error Clave:"+idplaza+" No Actualizada!", "Sistema Integral(Inventarios: Alta) : Ayuda",1);
              }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jt_catempleados1 = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jlbl_cantidadregistros = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        jbnt_liberarplaza = new javax.swing.JButton();
        jtf_plazaidplaza = new javax.swing.JTextField();
        jtf_plazaidemp1 = new javax.swing.JTextField();
        jtf_plazaidemp = new javax.swing.JTextField();
        jLabel42 = new javax.swing.JLabel();
        jtf_plazaidplaza1 = new javax.swing.JTextField();
        jLabel71 = new javax.swing.JLabel();
        jtf_plazadescrip = new javax.swing.JTextField();
        jPanel2 = new javax.swing.JPanel();
        jLabel40 = new javax.swing.JLabel();
        jtf_asist_horaent_pro = new javax.swing.JFormattedTextField();
        jLabel41 = new javax.swing.JLabel();
        jftf_asist_salidaprog = new javax.swing.JFormattedTextField();
        jLabel44 = new javax.swing.JLabel();
        jtf_minutoscomida = new javax.swing.JTextField();
        jLabel43 = new javax.swing.JLabel();
        jtf_asist_horaen_dcom = new javax.swing.JFormattedTextField();
        jLabel45 = new javax.swing.JLabel();
        jtf_asist_horasa_dcom = new javax.swing.JFormattedTextField();
        jLabel16 = new javax.swing.JLabel();
        jcmbx_ope_diavisita = new javax.swing.JComboBox();
        jButton1 = new javax.swing.JButton();
        jcmbx_asist_status = new javax.swing.JComboBox();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jtf_plazahoarioobser = new javax.swing.JTextField();
        jLabel46 = new javax.swing.JLabel();
        jtf_Htrabajadas = new javax.swing.JTextField();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane11 = new javax.swing.JScrollPane();
        jt_historialasistencia_detalle = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jmni_salir = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jmni_escape = new javax.swing.JMenuItem();
        jmni_actualizar = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(sie_invdis.Sie_invdisApp.class).getContext().getResourceMap(supervision_rh_plazas.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N

        jPanel1.setName("jPanel1"); // NOI18N

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        jt_catempleados1.setModel(this.jtable_modelo_empleado_p);
        jt_catempleados1.setName("jt_catempleados1"); // NOI18N
        jt_catempleados1.setRowHeight(22);
        jt_catempleados1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jt_catempleados1MouseClicked(evt);

                if(evt.getClickCount() >= 1)
                {
                    diodblclickpe(evt);
                    //System.out.println(" double click" );

                }
            }
        });
        jScrollPane2.setViewportView(jt_catempleados1);

        jlbl_cantidadregistros.setFont(resourceMap.getFont("jlbl_cantidadregistros.font")); // NOI18N
        jlbl_cantidadregistros.setText(resourceMap.getString("jlbl_cantidadregistros.text")); // NOI18N
        jlbl_cantidadregistros.setName("jlbl_cantidadregistros"); // NOI18N

        jLabel5.setFont(resourceMap.getFont("jLabel5.font")); // NOI18N
        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel5.border.title"))); // NOI18N
        jPanel5.setName("jPanel5"); // NOI18N

        jbnt_liberarplaza.setIcon(resourceMap.getIcon("jbnt_liberarplaza.icon")); // NOI18N
        jbnt_liberarplaza.setText(resourceMap.getString("jbnt_liberarplaza.text")); // NOI18N
        jbnt_liberarplaza.setName("jbnt_liberarplaza"); // NOI18N
        jbnt_liberarplaza.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbnt_liberarplazaActionPerformed(evt);
            }
        });

        jtf_plazaidplaza.setEditable(false);
        jtf_plazaidplaza.setFont(resourceMap.getFont("jtf_plazaidplaza.font")); // NOI18N
        jtf_plazaidplaza.setName("jtf_plazaidplaza"); // NOI18N

        jtf_plazaidemp1.setEditable(false);
        jtf_plazaidemp1.setFont(resourceMap.getFont("jtf_plazaidemp1.font")); // NOI18N
        jtf_plazaidemp1.setName("jtf_plazaidemp1"); // NOI18N

        jtf_plazaidemp.setEditable(false);
        jtf_plazaidemp.setFont(resourceMap.getFont("jtf_plazaidemp.font")); // NOI18N
        jtf_plazaidemp.setName("jtf_plazaidemp"); // NOI18N

        jLabel42.setText(resourceMap.getString("jLabel42.text")); // NOI18N
        jLabel42.setName("jLabel42"); // NOI18N

        jtf_plazaidplaza1.setFont(resourceMap.getFont("jtf_plazaidplaza1.font")); // NOI18N
        jtf_plazaidplaza1.setText(resourceMap.getString("jtf_plazaidplaza1.text")); // NOI18N
        jtf_plazaidplaza1.setToolTipText(resourceMap.getString("jtf_plazaidplaza1.toolTipText")); // NOI18N
        jtf_plazaidplaza1.setName("jtf_plazaidplaza1"); // NOI18N

        jLabel71.setText(resourceMap.getString("jLabel71.text")); // NOI18N
        jLabel71.setName("jLabel71"); // NOI18N

        jtf_plazadescrip.setEditable(false);
        jtf_plazadescrip.setFont(resourceMap.getFont("jtf_plazadescrip.font")); // NOI18N
        jtf_plazadescrip.setName("jtf_plazadescrip"); // NOI18N

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel5Layout.createSequentialGroup()
                            .addComponent(jLabel42)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jtf_plazaidemp))
                        .addComponent(jtf_plazaidemp1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jtf_plazaidplaza, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel71)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtf_plazaidplaza1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbnt_liberarplaza, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jtf_plazadescrip, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtf_plazaidemp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel42))
                .addGap(14, 14, 14)
                .addComponent(jtf_plazaidemp1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jtf_plazadescrip, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(4, 4, 4)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtf_plazaidplaza1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel71)
                    .addComponent(jbnt_liberarplaza)
                    .addComponent(jtf_plazaidplaza, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(112, Short.MAX_VALUE))
        );

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel2.border.title"))); // NOI18N
        jPanel2.setName("jPanel2"); // NOI18N

        jLabel40.setText(resourceMap.getString("jLabel40.text")); // NOI18N
        jLabel40.setName("jLabel40"); // NOI18N

        jtf_asist_horaent_pro.setText(resourceMap.getString("jtf_asist_horaent_pro.text")); // NOI18N
        jtf_asist_horaent_pro.setToolTipText(resourceMap.getString("jtf_asist_horaent_pro.toolTipText")); // NOI18N
        jtf_asist_horaent_pro.setFont(resourceMap.getFont("jtf_asist_horaent_pro.font")); // NOI18N
        jtf_asist_horaent_pro.setName("jtf_asist_horaent_pro"); // NOI18N
        jtf_asist_horaent_pro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_asist_horaent_proActionPerformed(evt);
            }
        });

        jLabel41.setText(resourceMap.getString("jLabel41.text")); // NOI18N
        jLabel41.setName("jLabel41"); // NOI18N

        jftf_asist_salidaprog.setText(resourceMap.getString("jftf_asist_salidaprog.text")); // NOI18N
        jftf_asist_salidaprog.setToolTipText(resourceMap.getString("jftf_asist_salidaprog.toolTipText")); // NOI18N
        jftf_asist_salidaprog.setFont(resourceMap.getFont("jftf_asist_salidaprog.font")); // NOI18N
        jftf_asist_salidaprog.setName("jftf_asist_salidaprog"); // NOI18N
        jftf_asist_salidaprog.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jftf_asist_salidaprogActionPerformed(evt);
            }
        });

        jLabel44.setText(resourceMap.getString("jLabel44.text")); // NOI18N
        jLabel44.setName("jLabel44"); // NOI18N

        jtf_minutoscomida.setFont(resourceMap.getFont("jtf_minutoscomida.font")); // NOI18N
        jtf_minutoscomida.setText(resourceMap.getString("jtf_minutoscomida.text")); // NOI18N
        jtf_minutoscomida.setName("jtf_minutoscomida"); // NOI18N
        jtf_minutoscomida.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_minutoscomidaActionPerformed(evt);
            }
        });

        jLabel43.setText(resourceMap.getString("jLabel43.text")); // NOI18N
        jLabel43.setName("jLabel43"); // NOI18N

        jtf_asist_horaen_dcom.setText(resourceMap.getString("jtf_asist_horaen_dcom.text")); // NOI18N
        jtf_asist_horaen_dcom.setToolTipText(resourceMap.getString("jtf_asist_horaen_dcom.toolTipText")); // NOI18N
        jtf_asist_horaen_dcom.setFont(resourceMap.getFont("jtf_asist_horaen_dcom.font")); // NOI18N
        jtf_asist_horaen_dcom.setName("jtf_asist_horaen_dcom"); // NOI18N
        jtf_asist_horaen_dcom.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_asist_horaen_dcomActionPerformed(evt);
            }
        });

        jLabel45.setText(resourceMap.getString("jLabel45.text")); // NOI18N
        jLabel45.setName("jLabel45"); // NOI18N

        jtf_asist_horasa_dcom.setText(resourceMap.getString("jtf_asist_horasa_dcom.text")); // NOI18N
        jtf_asist_horasa_dcom.setToolTipText(resourceMap.getString("jtf_asist_horasa_dcom.toolTipText")); // NOI18N
        jtf_asist_horasa_dcom.setFont(resourceMap.getFont("jtf_asist_horasa_dcom.font")); // NOI18N
        jtf_asist_horasa_dcom.setName("jtf_asist_horasa_dcom"); // NOI18N
        jtf_asist_horasa_dcom.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_asist_horasa_dcomActionPerformed(evt);
            }
        });

        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
        jLabel16.setName("jLabel16"); // NOI18N

        jcmbx_ope_diavisita.setName("jcmbx_ope_diavisita"); // NOI18N
        jcmbx_ope_diavisita.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcmbx_ope_diavisitaActionPerformed(evt);
            }
        });

        jButton1.setIcon(resourceMap.getIcon("jButton1.icon")); // NOI18N
        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jcmbx_asist_status.setName("jcmbx_asist_status"); // NOI18N
        jcmbx_asist_status.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcmbx_asist_statusActionPerformed(evt);
            }
        });

        jLabel36.setText(resourceMap.getString("jLabel36.text")); // NOI18N
        jLabel36.setName("jLabel36"); // NOI18N

        jLabel37.setText(resourceMap.getString("jLabel37.text")); // NOI18N
        jLabel37.setName("jLabel37"); // NOI18N

        jtf_plazahoarioobser.setFont(resourceMap.getFont("jtf_plazahoarioobser.font")); // NOI18N
        jtf_plazahoarioobser.setName("jtf_plazahoarioobser"); // NOI18N

        jLabel46.setText(resourceMap.getString("jLabel46.text")); // NOI18N
        jLabel46.setName("jLabel46"); // NOI18N

        jtf_Htrabajadas.setFont(resourceMap.getFont("jtf_Htrabajadas.font")); // NOI18N
        jtf_Htrabajadas.setText(resourceMap.getString("jtf_Htrabajadas.text")); // NOI18N
        jtf_Htrabajadas.setName("jtf_Htrabajadas"); // NOI18N
        jtf_Htrabajadas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_HtrabajadasActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel16)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jcmbx_ope_diavisita, 0, 170, Short.MAX_VALUE)
                        .addGap(139, 139, 139))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel36)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jcmbx_asist_status, 0, 162, Short.MAX_VALUE)
                        .addGap(139, 139, 139))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel44)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_minutoscomida, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(91, 91, 91))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel40, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_asist_horaent_pro, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel41)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jftf_asist_salidaprog, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel43)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_asist_horaen_dcom, javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel45)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_asist_horasa_dcom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(139, 139, 139))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel46, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_Htrabajadas, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton1))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel37)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_plazahoarioobser, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addContainerGap())))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(jcmbx_ope_diavisita, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jcmbx_asist_status, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel36))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jtf_asist_horaent_pro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel40)
                            .addComponent(jftf_asist_salidaprog, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel41))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel44)
                            .addComponent(jtf_minutoscomida, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(56, 56, 56)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jtf_asist_horaen_dcom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel43)
                            .addComponent(jLabel45)
                            .addComponent(jtf_asist_horasa_dcom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 45, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel37)
                    .addComponent(jtf_plazahoarioobser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(11, 11, 11)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton1)
                    .addComponent(jLabel46)
                    .addComponent(jtf_Htrabajadas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel3.border.title"))); // NOI18N
        jPanel3.setName("jPanel3"); // NOI18N

        jScrollPane11.setName("jScrollPane11"); // NOI18N

        jt_historialasistencia_detalle.setModel(this.jtable_modelo_horarios);
        jt_historialasistencia_detalle.setName("jt_historialasistencia_detalle"); // NOI18N
        jt_historialasistencia_detalle.setRowHeight(26);
        jScrollPane11.setViewportView(jt_historialasistencia_detalle);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane11, javax.swing.GroupLayout.DEFAULT_SIZE, 351, Short.MAX_VALUE)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane11, javax.swing.GroupLayout.DEFAULT_SIZE, 243, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jlbl_cantidadregistros, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel5)
                .addGap(711, 711, 711))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 918, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jlbl_cantidadregistros)
                    .addComponent(jLabel5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 278, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        jMenuBar1.setName("jMenuBar1"); // NOI18N

        jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N
        jMenu1.setName("jMenu1"); // NOI18N

        jmni_salir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK));
        jmni_salir.setIcon(resourceMap.getIcon("jmni_salir.icon")); // NOI18N
        jmni_salir.setText(resourceMap.getString("jmni_salir.text")); // NOI18N
        jmni_salir.setName("jmni_salir"); // NOI18N
        jmni_salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_salirActionPerformed(evt);
            }
        });
        jMenu1.add(jmni_salir);

        jMenuBar1.add(jMenu1);

        jMenu2.setText(resourceMap.getString("jMenu2.text")); // NOI18N
        jMenu2.setName("jMenu2"); // NOI18N

        jmni_escape.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0));
        jmni_escape.setText(resourceMap.getString("jmni_escape.text")); // NOI18N
        jmni_escape.setName("jmni_escape"); // NOI18N
        jmni_escape.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_escapeActionPerformed(evt);
            }
        });
        jMenu2.add(jmni_escape);

        jmni_actualizar.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5, 0));
        jmni_actualizar.setIcon(resourceMap.getIcon("jmni_actualizar.icon")); // NOI18N
        jmni_actualizar.setText(resourceMap.getString("jmni_actualizar.text")); // NOI18N
        jmni_actualizar.setName("jmni_actualizar"); // NOI18N
        jmni_actualizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_actualizarActionPerformed(evt);
            }
        });
        jMenu2.add(jmni_actualizar);

        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jbnt_liberarplazaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbnt_liberarplazaActionPerformed
        // TODO add your handling code here:

        if(JOptionPane.showConfirmDialog(null, "<html><b><h2>Plaza:<br>"+this.jtf_plazaidemp1.getText()+"<br> Estan Correctos sus Datos</h2></b></html>?")==0)
            {
            String  texto="select * from x1_supervision_empleados_actualiza_plaza(3,0,"+this.jtf_plazaidplaza.getText()+",'','"+""+"','"+this.jtf_plazaidplaza1.getText()+"','');",confirma="";
            System.out.println(texto);
            try
                {
                rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                while (rs.next())
                    {
                        confirma=rs.getString(1);
                    }
                }
                catch(Exception e)
                    {
                        System.out.println(e.getMessage());
                    }
            if (confirma.equals("1"))
                {
                JOptionPane.showMessageDialog(null,"Gracias status actualizado Correctamente", "Sistema Integral Tareas",1);
                }
                else
                {
                    JOptionPane.showMessageDialog(null,"Error Verifiqu con Administrador no se ha podido guardar", "Sistema Integral Error",1);
                }
        }
}//GEN-LAST:event_jbnt_liberarplazaActionPerformed

    private void jtf_asist_horaent_proActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_asist_horaent_proActionPerformed
        // TODO add your handling code here:
        this.jftf_asist_salidaprog.selectAll();
        this.jftf_asist_salidaprog.requestFocus();
}//GEN-LAST:event_jtf_asist_horaent_proActionPerformed

    private void jftf_asist_salidaprogActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jftf_asist_salidaprogActionPerformed
        // TODO add your handling code here:
        this.jtf_minutoscomida.selectAll();
        this.jtf_minutoscomida.requestFocus();
}//GEN-LAST:event_jftf_asist_salidaprogActionPerformed

    private void jtf_minutoscomidaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_minutoscomidaActionPerformed
        // TODO add your handling code here:
        this.jtf_asist_horaen_dcom.selectAll();
        this.jtf_asist_horaen_dcom.requestFocus();
}//GEN-LAST:event_jtf_minutoscomidaActionPerformed

    private void jtf_asist_horaen_dcomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_asist_horaen_dcomActionPerformed
        // TODO add your handling code here:
        this.jtf_asist_horasa_dcom.selectAll();
        this.jtf_asist_horasa_dcom.requestFocus();
}//GEN-LAST:event_jtf_asist_horaen_dcomActionPerformed

    private void jtf_asist_horasa_dcomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_asist_horasa_dcomActionPerformed
       
}//GEN-LAST:event_jtf_asist_horasa_dcomActionPerformed

    private void jcmbx_ope_diavisitaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmbx_ope_diavisitaActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jcmbx_ope_diavisitaActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
/*        Date hoy=new Date();
      int numeroDia=0;
      Calendar cal= Calendar.getInstance();
      cal.setTime(hoy);
      numeroDia=cal.get(Calendar.DAY_OF_WEEK);
      System.out.println("hoy es "+ numeroDia);*/
        if(JOptionPane.showConfirmDialog(null, "<html><b>Desea Crear Asistencia?<br>"+this.jtf_plazaidplaza.getText()+"<br>"+this.jtf_plazadescrip.getText()+"<br>"+this.jcmbx_ope_diavisita.getSelectedItem()+"<br>"+this.jcmbx_asist_status.getSelectedItem()+"</b></html>")==0)
                {
                    String arreglo_statusasis[]=this.jcmbx_asist_status.getSelectedItem().toString().split(":");
                    String arreglo_dia[]=this.jcmbx_ope_diavisita.getSelectedItem().toString().split(":");
                    this.asistencia_actualiza(1, this.jtf_plazaidplaza.getText(), arreglo_dia[0], this.jtf_plazahoarioobser.getText(),"0","","",arreglo_statusasis[0], "","","",this.jtf_asist_horaent_pro.getText(),this.jftf_asist_salidaprog.getText(),this.jtf_asist_horaen_dcom.getText(),this.jtf_asist_horasa_dcom.getText(),this.jtf_minutoscomida.getText(),this.jtf_Htrabajadas.getText(),"");

                }
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jcmbx_asist_statusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmbx_asist_statusActionPerformed
        // TODO add your handling code here:
        this.jtf_asist_horaent_pro.selectAll();
        this.jtf_asist_horaent_pro.requestFocus();
}//GEN-LAST:event_jcmbx_asist_statusActionPerformed

    private void jtf_HtrabajadasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_HtrabajadasActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jtf_HtrabajadasActionPerformed

    private void jmni_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_salirActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Desea Salir?")==0)
                {
                    this.dispose();
                }
    }//GEN-LAST:event_jmni_salirActionPerformed

    private void jmni_escapeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_escapeActionPerformed
        // TODO add your handling code here:
        this.jmni_salirActionPerformed(evt);
    }//GEN-LAST:event_jmni_escapeActionPerformed

    private void jmni_actualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_actualizarActionPerformed
        // TODO add your handling code here:
         this.carga_datos_empleadoplazas(0, "");
    }//GEN-LAST:event_jmni_actualizarActionPerformed
private void jt_catempleados1MouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new supervision_rh_plazas().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel71;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JButton jbnt_liberarplaza;
    private javax.swing.JComboBox jcmbx_asist_status;
    private javax.swing.JComboBox jcmbx_ope_diavisita;
    private javax.swing.JFormattedTextField jftf_asist_salidaprog;
    private javax.swing.JLabel jlbl_cantidadregistros;
    private javax.swing.JMenuItem jmni_actualizar;
    private javax.swing.JMenuItem jmni_escape;
    private javax.swing.JMenuItem jmni_salir;
    private javax.swing.JTable jt_catempleados1;
    private javax.swing.JTable jt_historialasistencia_detalle;
    private javax.swing.JTextField jtf_Htrabajadas;
    private javax.swing.JFormattedTextField jtf_asist_horaen_dcom;
    private javax.swing.JFormattedTextField jtf_asist_horaent_pro;
    private javax.swing.JFormattedTextField jtf_asist_horasa_dcom;
    private javax.swing.JTextField jtf_minutoscomida;
    private javax.swing.JTextField jtf_plazadescrip;
    private javax.swing.JTextField jtf_plazahoarioobser;
    private javax.swing.JTextField jtf_plazaidemp;
    private javax.swing.JTextField jtf_plazaidemp1;
    private javax.swing.JTextField jtf_plazaidplaza;
    private javax.swing.JTextField jtf_plazaidplaza1;
    // End of variables declaration//GEN-END:variables

}
